<template>
  <el-table
    :data="data"
    fit
  >
    <template v-for="(item, index) in header">
      <el-table-column :key="index" :label="item.label" :prop="item.prop" />
    </template>
    <slot />
  </el-table>
</template>

<script>
export default {
  name: 'SimTabel',
  props: {
    title: {
      type: String,
      default: null
    },
    header: {
      type: Array,
      default() {
        return []
      }
    }, // label, props
    data: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style lang="scss">

</style>
